from pathlib import Path
from llms import moonshot_llm
def ocr_file_to_text_llm(file_path) -> str:
    """
    提取文件中的文本
    :param file_path:
    :return:
    """
    client = moonshot_llm()
    file_object = client.files.create(file=Path(file_path), purpose="file-extract")
    file_content = client.files.content(file_id=file_object.id).json()
    return file_content.get("content")